package cn.itsource.org.service;

import cn.itsource.org.domain.Department;
import cn.itsource.org.query.DepartmentQuery;
import cn.itsource.utli.PageInfo;
import cn.itsource.utli.PageInfo;

import java.util.List;

public interface IDepartmentService {
    /**
     * 新增
     * @param department
     */
    void save(Department department);

    /**
     * 修改
     * @param department
     */
    void update(Department department);

    /**
     * 删除
     * @param id
     */
    void delete(Long id);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    Department queryById(Long id);

    /**
     * 查询全部
     * @return
     */
    List<Department> queryAll();

    /**
     * 分页信息
     * @param query
     * @return
     */
    PageInfo<Department> queryPage(DepartmentQuery query);

    /**
     * 批量删除
     * @param ids
     */
    void patchDel(Long[] ids);

    /**
     * 获取部门树的方法
     * @return
     */
    List<Department> getDeptTree();
}
